home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
576-600
/
disk_587
/
conlib
/
c_stuff
/
conglue.asm
next >
Wrap
Assembly Source File
|
1992-05-06
|
3KB
|
163 lines
;==================================================================
;===
;=== Name: ConGlue.asm
;===
;=== Author: Bjørn Reese & Michael Berg
;===
;=== Glue code for 'con.library'
;===
;==================================================================
XREF _ConBase
;--- First the _LVO's ---------------------------------------------
_LVOOpenCon EQU -30
_LVOCloseCon EQU -36
_LVODoFormat EQU -42
_LVOUserNotes EQU -48
_LVODefineChars EQU -54
_LVODisplayRaw EQU -60
_LVODisplay EQU -66
_LVOAccept EQU -72
_LVOAcceptString EQU -78
_LVOSetMsgHandler EQU -84
_LVOGetInfo EQU -90
_LVOSetGfx EQU -96
_LVOGotoXY EQU -102
_LVOCursor EQU -108
_LVOScroll EQU -114
_LVOConvert EQU -120
;--- Custom Macro -------------------------------------------------
CALLCON: MACRO
move.l a6,-(sp)
move.l _ConBase,a6
jsr _LVO\1(a6)
move.l (sp)+,a6
rts
ENDM
;--- The glue code itself -----------------------------------------
XDEF _OpenCon
_OpenCon:
move.l 4(sp),a0 ; ConWindow
move.l 8(sp),d0 ; CursorMode
CALLCON OpenCon
XDEF _CloseCon
_CloseCon:
move.l 4(sp),a0 ; ConHandle
CALLCON CloseCon
XDEF _DoFormat
_DoFormat:
movem.l a2/a3/a6,-(sp)
movem.l 12+4(sp),a0-a3 ; ConHandle, String, FormatArgs, TextBuffer
move.l 12+20(sp),d0 ; BufferSize
move.l _ConBase,a6
jsr _LVODoFormat(a6)
movem.l (sp)+,a2/a3/a6
rts
XDEF _UserNotes
_UserNotes:
move.l 4(sp),a0 ; ConHandle
move.l 8(sp),a1 ; UserText
move.w 12(sp),d0 ; NoteNumber
CALLCON UserNotes
XDEF _DefineChars
_DefineChars:
move.w 4(sp),d0 ; Mode
move.l 6(sp),a1 ; BitTable
move.l 10(sp),a2 ; ArrayOfChars
CALLCON DefineChars
XDEF _DisplayRaw
_DisplayRaw:
move.l 4(sp),a0 ; ConHandle
move.l 8(sp),a1 ; String
move.l 12(sp),d0 ; MaxLength
CALLCON DisplayRaw
XDEF _Display
_Display:
movem.l a2/a6,-(sp)
movem.l 8+4(sp),a0/a1/a2 ; ConHandle, String, FormatArgs
move.l 8+16(sp),d0 ; MaxLength
move.l _ConBase,a6
jsr _LVODisplay(a6)
movem.l (sp)+,a2/a6
rts
XDEF _Accept
_Accept:
move.l 4(sp),a0 ; ConHandle
move.l 8(sp),a1 ; AcceptStructure
move.l 12(sp),d0 ; Flags
CALLCON Accept
XDEF _AcceptString
_AcceptString:
move.l 4(sp),a0 ; ConHandle
move.l 8(sp),a1 ; AcceptStructure
move.l 12(sp),d0 ; Flags
CALLCON AcceptString
XDEF _SetMsgHandler
_SetMsgHandler:
move.l 4(sp),a0 ; ConHandle
move.l 8(sp),a1 ; NewMsgHandler
CALLCON SetMsgHandler
XDEF _GetInfo
_GetInfo:
move.l 4(sp),a0 ; ConHandle
move.l 8(sp),a1 ; ConInfo
CALLCON GetInfo
XDEF _SetGfx
_SetGfx:
movem.l d2/a6,-(sp)
move.l 8+4(sp),a0 ; ConHandle
movem.w 8+8(sp),d0/d1/d2 ; Styles, FgCol, BgCol
move.l _ConBase,a6
jsr _LVOSetGfx(a6)
movem.l (sp)+,d2/a6
rts
XDEF _GotoXY
_GotoXY:
move.l 4(sp),a0 ; ConHandle
movem.w 8(sp),d0/d1 ; X, Y
CALLCON GotoXY
XDEF _Cursor
_Cursor:
move.l 4(sp),a0 ; ConHandle
move.w 8(sp),d0 ; Mode
CALLCON Cursor
XDEF _Scroll
_Scroll:
move.l 4(sp),a0 ; ConHandle
move.w 8(sp),d0 ; Step
CALLCON Scroll
XDEF _Convert
_Convert:
movem.l a2/a6,-(sp)
move.l 8+4(sp),a1 ; String
move.l 8+8(sp),a2 ; ResultBuffer
move.l 8+12(sp),d0 ; Flags
move.w 8+16(sp),d1 ; MaxLength
move.l _ConBase,a6
jsr _LVOConvert(a6)
movem.l (sp)+,a2/a6
rts
END